Skip to content

VS Code smoke test: set its own desktop display, not rely on an earlier step - #124

Merged
agorischek merged 4 commits into
mainfrom
fix-vscode-evidence-wait
Nov 21, 2026
Merged

agorischek merged 4 commits into
mainfrom
fix-vscode-evidence-wait

Conversation

@agorischek

@agorischek agorischek commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

The flake

windows-integration → VS Code extension smoke test failed with

Timed out waiting for the evidence: {"item":{"id":"workspace:@demo/auth",…},"evidence":[],"details":[]}

(test/smoke/workflows/inspector.cjs:62) and passed on rerun.

The race

It isn't a race in the extension or the webview: it's an ordering problem between CI steps.

The smoke test drives the Inspector as on a desktop, so windows-integration sets a 1920×1080 display with animations on in the step A desktop-sized display, with animations, just before it. That step has the default if: success(); the smoke test has if: ${{ !cancelled() }}. Whenever an earlier step failed (in practice the Browser smoke test's CLI screenshot --page, "The browser did not open its DevTools endpoint", the cold-start flake #93 fixed), the display step was skipped and the smoke test ran on the runner's 1024×768 display:

  1. VS Code's editor is then narrower than the Inspector's two-panel layout (1012 px), so the title bar condenses to its overflow level and the Show details panel toggle moves into More actions.
  2. inspector.cjs clicks button[aria-label="Show details panel"] only if it's in the bar, so the Details panel (closed by default) never opens.
  3. The evidence (.ph-evidence button, .phv-evidence-link) is rendered only in that panel, so it never appears. The failure's own diagnostics say so: "details":[] means no element whose label ends in "details panel" exists, neither the toggle nor the open panel's Close details panel.

Waiting longer couldn't help: the evidence wasn't late, it was never going to be shown. The rerun passed because the browser step passed and the display step ran.

The fix

test/smoke/run.mjs now sets the display and animations itself (the same Set-DisplayResolution and SPI_SETCLIENTAREAANIMATION calls) on a GitHub-hosted Windows runner (RUNNER_ENVIRONMENT=github-hosted), as it starts and before it launches VS Code. The smoke test's precondition no longer depends on any earlier step's outcome, which also keeps it correct under the workflow restructure in progress. A local run, or a self-hosted runner, never changes the display.

The ci.yml step is now redundant. I didn't touch ci.yml because a parallel change is restructuring it; that change can drop the step (or give it if: ${{ !cancelled() }}).

Evidence

The last 200 Projections runs (2026-11-20 05:35Z–21:08Z), every attempt of windows-integration:

count
"Timed out waiting for the evidence: @demo/auth" 23 attempts on 12 branches, including main (job 136523352834) and #90's fix-windows-mcp-write
… of those, after a failed earlier step (Browser smoke test) 23 / 23
… of those, with the display step run 0 / 23 (its Set-DisplayResolution is absent from every log)
Attempts with the display step run where the smoke test timed out on the evidence 0 / 138 (136 passed; 2 failed on a branch's own pane-label change)
Passed on rerun 3 runs (agorischek/column-gap, hosted-artifact-trust-contract, agorischek/edge-source-dot), each with the browser step passing on the rerun; the rest were cancelled or superseded
Since #93 merged (22:21Z) 12 / 12 attempts: browser step passed, VS Code smoke test passed

Since #93 made the browser launch wait within the caller's budget, the step that skipped the display rarely fails; but any failure before the smoke test (a browser install, a build error, a harness test) would still have produced this second, misleading failure.

Verification in CI

  • A throwaway commit made the CLI's browser test fail, so the display step was skipped as in the failures above; the VS Code smoke test then passed with the Browser smoke test failed and the display step skipped (job 136646898905). Before this change, that combination failed 23 of 23 times. The commit was then reverted (572674f).
  • windows-integration on the final commit: 3 / 3 passed (attempt 1, attempt 2, attempt 3).
  • In total the VS Code smoke test passed 4 / 4, including the run with the display step skipped.

tools check --fast passes locally. Per the machine rules I didn't run the VS Code test host here.

agorischek and others added 2 commits November 20, 2026 15:55
…er step

The smoke test drives the Inspector as on a desktop, so windows-integration set
a 1920×1080 display with animations on in a step before it. That step had the
default `if: success()`, while the smoke test runs `if: !cancelled()`: whenever
the Browser smoke test (or the build) failed, the display stayed at the
runner's 1024×768, VS Code's editor was narrower than the Inspector's
two-panel layout, its Details toggle moved into More, and the test timed out
waiting for the evidence of @demo/auth. Every such timeout came after a failed
step, none after the display was set.

run.mjs now sets the display and animations itself on a GitHub-hosted Windows
runner, as it starts, so the result depends only on the smoke test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The CLI browser-test script still contains a temporary forced failure, causing every Windows integration run to fail its browser smoke-test step without executing the suite.

1 open issue
What changed in this PR

This PR makes the VS Code smoke test establish its own desktop prerequisites, avoiding Inspector failures when an earlier CI failure skips display setup.

Changes:

  • Sets a 1920×1080 display and enables animations before launching VS Code on GitHub-hosted Windows runners only.
  • Documents the smoke test’s display setup.
  • Changes the CLI browser-test command to a forced failure for verification.
File Description
packages/​integrations/​vscode/​test/​smoke/​run.mjs Configures display resolution and animations at smoke-test startup.
packages/​cli/​package.json Replaces the Playwright browser-test command with exit 1.
docs/​maintainers/​vscode-extension.md Documents automatic desktop setup on hosted Windows runners.

Review effort: Balanced

Comment thread packages/cli/package.json Resolved
agorischek and others added 2 commits November 20, 2026 16:18
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the VS Code smoke test desktop-prerequisite changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@agorischek
agorischek merged commit 59803ec into main Nov 21, 2026
63 checks passed
@agorischek
agorischek deleted the fix-vscode-evidence-wait branch November 21, 2026 02:11
agorischek added a commit that referenced this pull request Nov 21, 2026
…test now does itself (#130)

#124 moved the 1920×1080 display and animations into the smoke test's runner,
which sets them as it starts on a hosted Windows runner. The step before it
was skipped whenever an earlier step failed, which is what timed the test
out; it now only repeats what the test does.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants